﻿<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>PayPal Test - jPayPalCart</title>

    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
  
    <!--<script type="text/javascript" src="http://www.scaleaccompaniments.com/js/jPayPalCart.js?v2"></script>-->
    <script type="text/javascript" src="../../scripts/jPayPalCart8.js"></script>
  
    <link rel="stylesheet" type="text/css" href="http://www.scaleaccompaniments.com/js/jPayPalCart.css" />

    <script type="text/javascript">
        $(document).ready(function () {
            // Create a basic cart
            $("#myPayPalCart").PayPalCart({
                business: 'paypal_1353538362_biz@adevso.net',
                notifyURL: 'http://www.yournotifyURL.com/notify.php',
                virtual: true,             //set to true where you are selling virtual items such as downloads
                quantityupdate: false,       //set to false if you want to disable quantity updates in the cart 
                currency: 'USD',            //set to your trading currency - see PayPal for valid options
                currencysign: '$',          //set the currency symbol
                minicartid: 'minicart',     //element to show the number of items and net value
                persitdays: 0,              //set to -1 for cookie-less cart for single page of products, 
                                            // 0 (default) persits for the session, 
                                            // x (number of days) the basket will persits between visits
                //showCart: false,
                language: 'es'//,
                //returnURL: "@Url.Action("Index")"
            });

            $("#cmdAddPayPal").click(function () {
                //alert("<before add>");
                var code = 'code1';
                var description = 'description1';
                var quantity = 1;
                var value = 100;
                var tax = 10;
                try {
                    $("#myPayPalCart").PayPalCart('add', code, description, quantity, value, tax);
                }
                catch (ex) {
                    alert(ex);
                }
                //alert("<after add>");
                return false;
            });
        });        
    </script>
</head>
<body>
    <input type="submit" value="Add to Cart" id="cmdAddPayPal"/>
  
    <div id="myPayPalCart"></div>

<!--    <script type="text/javascript">
        $(document).on("click", "#cmdAddPayPal", null, function () {
            alert("test");
            var code = 'code1';
            var description = 'description1';
            var quantity = 1;
            var value = 100;
            var tax = 10;
            $("myPayPalCart").PayPalCart('add', code, description, quantity, value, tax);
            return false;
        });

        //$("cmdAddPayPal").click(function () {
        //    alert("Handler for .click() called.");
        //});
    </script>-->
</body>
</html>
